<script type="text/javascript">
<!--
function demands_clremove(){
	var activeRecord = document.getElementById('clients_activerecord');
	var zkRid = document.getElementById('_zk_rid');
	var zkIsTourist = document.getElementById('_zk_is_tourist');
	if(!activeRecord) return; 
	var str = activeRecord.value;
	var pickerField =  document.getElementById('_clients_rid').value;
	if(str!=''){
		var i = 0;
		var pickerArr = pickerField.split('-');
		var qEl = pickerArr.length;
		while(i<qEl){
			if(pickerArr[i]==str){
				pickerArr.splice(i,1);
				if(zkRid.value==str){
					zkRid.value = '';
					zkIsTourist.value = '0';
				}  
				break;
			}
			i = i+1;
		}
		document.getElementById('_clients_rid').value = pickerArr.join('-');
	}
} 
//-->
</script>
<a href="#" onclick="demands_clremove();">
<img class="button" border="0" align="middle" title="<?php echo $this->lang->line('REMOVE');?>"; src="<?php echo base_url(); ?>public/img/icons/delete.gif"/>
</a>
